﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
    namespace="SmartHRMS.Model"
        assembly="SmartHRMS.Model">

  <class name="SmartHRMS.Model.Account.User,SmartHRMS.Model" table="Accounts_Users" lazy="false">

    <id name="UserId" column="UserId" type="guid">
      <generator class="guid" />
    </id>

    <property name="UserName" unique="true">
      <column name="UserName"
                    not-null="true" sql-type="nvarchar(50)" length="50" />
    </property>

    <property name="LastPassword">
      <column name="Password"
                    not-null="true" sql-type="nvarchar(255)" length="255" />
    </property>

    <property name="EmployeeCode">
      <column name="EmployeeCode"
                    not-null="false" sql-type="nvarchar(MAX)" />
    </property>

    <component name="CommonFields" class="CommonFields,SmartHRMS.Model">
      
      <property name="InsertedBy">
        <column not-null="false" name="InsertedBy" sql-type="uniqueidentifier"/>
      </property>
      
      <property name="InsertedDate" >
        <column not-null="false" name="InsertedDate" length="50" sql-type="nvarchar(50)"/>
      </property>
      
      <property name="UpdatedBy">
        <column not-null="false" name="UpdatedBy"  sql-type="uniqueidentifier"/>
      </property>
      
      <property name="UpdatedDate">
        <column not-null="false" name="UpdatedDate" length="50"  sql-type="nvarchar(50)" />
        
      </property>
    </component>


  </class>

</hibernate-mapping>